!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[QuickActionBar_anchoredSkin]",["react"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[QuickActionBar_anchoredSkin]"]=t(require("react")):e["rb_wixui.thunderbolt[QuickActionBar_anchoredSkin]"]=t(e.React)}("undefined"!=typeof self?self:this,(function(e){return function(){var t={96114:function(e,t,n){var o;!function(t){"use strict";var i=function(){},r=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function a(){var e=this;e.reads=[],e.writes=[],e.raf=r.bind(t),i("initialized",e)}function c(e){e.scheduled||(e.scheduled=!0,e.raf(s.bind(null,e)),i("flush scheduled"))}function s(e){i("flush");var t,n=e.writes,o=e.reads;try{i("flushing reads",o.length),e.runTasks(o),i("flushing writes",n.length),e.runTasks(n)}catch(e){t=e}if(e.scheduled=!1,(o.length||n.length)&&c(e),t){if(i("task errored",t.message),!e.catch)throw t;e.catch(t)}}function u(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}a.prototype={constructor:a,runTasks:function(e){var t;for(i("run tasks");t=e.shift();)t()},measure:function(e,t){i("measure");var n=t?e.bind(t):e;return this.reads.push(n),c(this),n},mutate:function(e,t){i("mutate");var n=t?e.bind(t):e;return this.writes.push(n),c(this),n},clear:function(e){return i("clear",e),u(this.reads,e)||u(this.writes,e)},extend:function(e){if(i("extend",e),"object"!=typeof e)throw new Error("expected object");var t=Object.create(this);return function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};var l=t.fastdom=t.fastdom||new a;void 0===(o=function(){return l}.call(l,n,l,e))||(e.exports=o)}("undefined"!=typeof window?window:void 0!==this?this:globalThis)},5329:function(t){"use strict";t.exports=e},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t"undefined"!=typeof window,a=e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{});const c=(e,o)=>{const{rootProps:i,classes:r={},id:c,onMouseEnter:s,onMouseLeave:u}=e,l={display:i.display,position:i.position,...e.style};return n.createElement("div",t()({},a(e),{className:r.root,style:l,id:c,ref:o,onMouseEnter:s,onMouseLeave:u}),n.createElement("div",{className:r.actionsContainer,id:c+"actionsContainer"},e.children))};var s=n.forwardRef(c);function u(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t{const n=[];return e&&n.push(`${d}${e}`),t.forEach((e=>{e&&(n.push(`${d}${e}`),n.push(e))})),n.join(" ")},p=(e,o)=>{const{compId:i,className:r,text:c,svgString:s,itemType:u,hasNotifications:d,color:f,link:p={},skinStyles:m={},clickHandler:h,keyDownHandler:v,role:y,tabIndex:k}=e,{linkPopupId:g,href:b,anchorDataId:x,anchorCompId:w,target:A}=p,M=f?{"--color":f}:void 0;return n.createElement("a",t()({id:i},a(e),{"aria-label":c,"data-quick-action":"action","data-aid":u,"data-anchor":x,"data-anchor-comp-id":w,onClick:h,onKeyDown:v,className:l(r,m.action),href:b,target:A,ref:o,style:M,"data-popupid":g},y&&{role:y},void 0!==k&&{tabIndex:k}),n.createElement("div",{className:m.icon,"data-quick-action":"icon",dangerouslySetInnerHTML:{__html:s}}),n.createElement("div",{className:m.text,"data-quick-action":"text"},c),d&&n.createElement("div",{className:m.notifications,"data-quick-action":"notifications"}))};var m=n.forwardRef(p),h=o(96114),v=o.n(h);function y(){if(!r())return{x:0,y:0,isAtPageBottom:!1};const{left:e,top:t}=document.body.getBoundingClientRect();return{x:e,y:t,isAtPageBottom:window.innerHeight+window.scrollY===document.body.scrollHeight}}var k={root:"quick-action-bar"};const g={black:"0,0,0",grey:"128,128,128",brand:void 0};function b(e,t){return"dynamicAction-"+e+"-"+t}var x=e=>{const{id:o,className:i,customClassNames:c=[],skin:s,skinStyles:u,items:d=[],dynamicActions:p=[],translations:h,onOpen:x,onClose:w,onTrackEvent:A,maxActions:M,hideText:T,alignment:I,isFloating:B=!1,colorScheme:C,isColorSchemeInverted:P,isHidden:E=!1,shouldSetPositionAbsoluteAtPageBottom:S,onQuickActionBarItemClicked:O,onMouseEnter:L=()=>{},onMouseLeave:_=()=>{},openActionBar:D,closeActionBar:N,reportBiOnMenuButtonClick:j,reportBiOnMenuItemClick:R,isOpen:q}=e,H="left"===I,F=d.length,U=p.length,Q=Math.min(M-U,F),z=Q+U,G=z>0,[$,K]=(0,n.useState)(!1);!function(e,t,o){void 0===o&&(o={}),o={waitFor:100,disabled:!1,...o};const i=(0,n.useRef)(y());let a=null;const c=()=>{v().measure((()=>{const t=y(),n=i.current;i.current=t,a=null,v().mutate((()=>e({prevPos:n,currPos:t})))}))};(r()?n.useLayoutEffect:n.useEffect)((()=>{if(!r())return;const e=()=>{null===a&&(a=window.setTimeout(c,o.waitFor))};return o.disabled?()=>{}:(window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e),a&&window.clearTimeout(a)})}),t)}((e=>{let{currPos:t}=e;return n=t.isAtPageBottom,void K(n);var n}),[]);const V=(e,t)=>{["phone","email","whatsapp","line"].includes(e)?A("Lead",{action:e+" clicked",label:"Mobile Action Bar | "+t}):A("CustomEvent",{eventCategory:"Engagement",eventAction:t+" clicked",eventLabel:"Mobile Action Bar"})},Z=n.useRef(x),J=n.useRef(w);n.useEffect((()=>{q?null==Z.current||Z.current():null==J.current||J.current()}),[q]);const W=B&&z>1,X=n.useRef(null);const Y=h.menuButtonAriaLabel||"Quick action menu",ee={root:l(i,[u.root],[u["action-count-"+z]],f(k.root,...c),{[u["hide-text"]]:T,[u.closed]:!q,[u["align-left"]]:H,[u.hidden]:E}),action:l(u.action,{[u.inverted]:P}),icon:u.icon,svg:u.svg,text:u.text,controlButton:u.controlButton,notifications:u.notifications,dots:u.dots,firstDot:u.firstDot,secondDot:u.secondDot,thirdDot:u.thirdDot,separator:u.separator,actionsContainer:u.actionsContainer,overlay:u.overlay},te=n.useRef(null);function ne(e){var t;"Tab"!==e.key||e.shiftKey||(e.preventDefault(),e.stopPropagation(),null==(t=te.current)||t.focus())}const oe={isOpen:q,position:S&&$?"absolute":"fixed"},ie={onClick:N},re={ariaLabel:Y||"",ariaExpanded:q,onClick:function(){null==j||j(!!q),q?N():D()},onKeyDown:function(e){var t;W&&q&&"Tab"===e.key&&e.shiftKey&&(e.preventDefault(),e.stopPropagation(),null==(t=X.current)||t.focus())}},ae={display:W&&!q?"none":""},ce=!q&&p.some((e=>e.hasNotifications)),se=function(e){return g[e]}(C);return n.createElement(s,t()({},a(e),{"data-has-actions":G,"data-is-open":q,rootProps:oe,overlayProps:ie,controlButtonProps:re,actionsContainerProps:ae,hasNotifications:ce,classes:ee,ref:te,id:o,style:{visibility:G?"visible":"hidden","--predefined-color":se},onMouseEnter:L,onMouseLeave:_}),function(){const e=[],i=d.slice(0,Q).concat(p.map(((e,t)=>{let{text:n,itemType:i,svgString:r,hasNotifications:a,color:c,onActivate:s}=e;return{compId:b(o,t),text:n,itemType:i,svgString:r,role:"button",tabIndex:0,hasNotifications:a,color:c,clickHandler(){null==R||R({text:n,itemType:i}),V(i,n),null==O||O({type:"quickActionBarItemClicked",item:{itemType:i,label:n,link:""},actionIndex:t}),N(),s()}}})));return i.forEach(((o,r)=>{const{itemType:a,text:c,link:s}=o,u=r===i.length-1,l={skinStyles:ee,clickHandler:()=>{var e;null==R||R({text:c,link:s,itemType:a}),V(a,c),null==O||O({item:{itemType:o.itemType,label:o.text,link:(null==(e=o.link)?void 0:e.href)||""},actionIndex:r,type:"quickActionBarItemClicked"}),N()},...o};(e=>B&&e)(u)?(l.ref=X,l.keyDownHandler=ne):l.ref=null,e.push(n.createElement(m,t()({},l,{key:o.compId}))),u||e.push(n.createElement("div",{className:ee.separator,key:r,"data-quick-action":"separator"}))})),e}())},w={rootClass:"gjn4c3",fixedRoot:"kB6I3L",root:"uu2PtB",notifications:"hsI1Xh","notify-chat":"ETaCHM",notifyChat:"ETaCHM",actionsContainer:"nLNMF9",action:"obGyHP",icon:"zrvbRq",text:"UpUohb",inverted:"bki_Ia","hide-text":"MtS10A",hideText:"MtS10A",hidden:"pbZc0f","action-count-0":"Ln3BEi",actionCount0:"Ln3BEi",overlay:"B5f9qb",controlButton:"hquBkG",separator:"P2d17f"};const A=(e,o)=>n.createElement(s,t()({},e,{ref:o}));var M=e=>n.createElement(x,t()({},e,{skin:n.forwardRef(A),skinStyles:w}));const T=e=>e.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`));var I;!function(e){e.Text="Text",e.Menu="Menu",e.Image="Image",e.Input="Input",e.Login="Login",e.Button="Button",e.Social="Social",e.Gallery="Gallery",e.Community="Community",e.Decorative="Decorative",e.MenuAndSearch="MenuAndSearch",e.MenuAndAnchor="MenuAndAnchor"}(I||(I={}));const B=e=>"linkPopupId"in e,C=(e,t)=>{if(B(e))return e.linkPopupId;{const{pagesMap:n,mainPageId:o}=t||{};if(!n)return;const i=new URL(e.href??"");let r=Object.values(n).find((({pageUriSEO:e})=>!!e&&i.pathname?.includes(e)));return r||(r=o?n[o]:void 0),r?.pageId}},P=e=>{if(void 0!==e)return null===e?"None":e.type},E=(e,t)=>{if(!e?.type)return;const{type:n}=e;switch(n){case"AnchorLink":return e.anchorDataId;case"DocumentLink":return e.docInfo?.name;case"PageLink":const n=C(e,t);return n&&t?.pagesMap?.[n]?.title;default:return e.href}},S=(e,t,n)=>{const{link:o,value:i,details:r,actionName:a,elementType:c,trackClicksAnalytics:s,pagesMetadata:u,...l}=t;if(!s)return;const d=u&&{...u,pagesMap:window.viewerModel?.siteFeaturesConfigs?.router?.pagesMap},f=((e,t)=>{if(!e?.type)return;const{type:n}=e;switch(n){case"AnchorLink":return(e=>"anchorDataId"in e&&("SCROLL_TO_TOP"===e.anchorDataId||"SCROLL_TO_BOTTOM"===e.anchorDataId))(e)?void 0:{id:e.anchorDataId};case"DocumentLink":return{id:e.docInfo?.docId};case"PageLink":return{id:C(e,t),isLightbox:B(e)};default:return}})(o,d),p=r||f?JSON.stringify({...f,...r}):void 0;e({src:76,evid:1113,...{...l,bl:navigator.language,url:window.location.href,details:p,elementType:c??"Unknown",actionName:a??P(o),value:i??E(o,d)}},{endpoint:"pa",...n})};var O;const L={QuickActionBar_anchoredSkin:{component:M,controller:(O=e=>{let{mapperProps:t,controllerUtils:n,stateValues:o}=e;const{trackEvent:i,reportBi:r}=o,{updateProps:a}=n,{compId:c,language:s,mainPageId:u,fullNameCompType:l,trackClicksAnalytics:d,...f}=t,p={language:s,trackClicksAnalytics:d,element_id:c,elementType:l,elementGroup:I.Menu};return{...f,reportBiOnMenuItemClick:e=>{const{text:t,itemType:n,link:o}=e;S(r,{...p,link:o,elementTitle:t,details:{itemType:n},pagesMetadata:{mainPageId:u}})},reportBiOnMenuButtonClick:e=>{S(r,{...p,value:e})},onTrackEvent(e,t){i&&i({eventName:e,params:t})},openActionBar:()=>{a({isOpen:!0})},closeActionBar:()=>{a({isOpen:!1})}}},{useComponentProps:(e,t,n)=>{const o=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,[t,n])=>{return{...e,[(o=t,o.startsWith("--")?t:T(t))]:void 0===n?null:n};var o}),{});e.updateStyles(n)}}))(n);return O({mapperProps:e,stateValues:t,controllerUtils:o})}})}}}(),i}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[QuickActionBar_anchoredSkin].4383ca3b.bundle.min.js.map